package com.threeonemeeting.util;

import java.io.File;

import android.content.Context;
import android.os.Environment;

public class AppSettings {

	/**
	 * 获取当前应用在SD卡上的目录
	 * 
	 * @param context
	 * @return
	 */
	public static String getAppPath(Context context) {
		File externalStorageDirectory = Environment
				.getExternalStorageDirectory();
		return new StringBuilder()
				.append(externalStorageDirectory.getAbsolutePath()).append("/")
				.append("31meeting").toString();
	}

	/**
	 * 获取Http响应缓存目录
	 * 
	 * @param context
	 * @return
	 */
	public static String getResponsePath(Context context) {
		return new StringBuilder().append(getAppPath(context)).append("/")
				.append("response").append("/").toString();
	}

	
	/*
	 * 获取软件截图存放路径
	 */
	public static String getImagePath(Context context) {
		return new StringBuilder().append(getAppPath(context)).append("/")
				.append("thumb").append("/").toString();
	}

	/*
	 * 获取下载的APk文件的路径
	 */
	public static String getApkPath(Context context) {
		return new StringBuilder().append(getAppPath(context)).append("/")
				.append("apk").append("/").toString();
	}

	/**
	 * 获取缓存目录
	 * 
	 * @param context
	 * @return
	 */
	public static String getCachePath(Context context) {
		return new StringBuffer().append(getAppPath(context)).append("/")
				.append("cache").append("/").toString();
	}

	/**
	 * 获取下载文件路径目录
	 * 
	 * @param context
	 * @return
	 */
	public static String getFilePath(Context context) {
		return new StringBuffer().append(getAppPath(context)).append("/")
				.append("file").append("/").toString();
	}
}
